package com.bw;

import com.bw.Bean.User;
import com.bw.Bean.UserPai;
import com.bw.Service.UserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

@SpringBootTest
@RunWith(SpringRunner.class)
public class MyTestJava {

    @Autowired
    UserService service;

    @Test
    public void Show(){
        List<User> list = service.list();
        for (User user : list) {
            System.out.println(user);
        }
    }

    @Test
    public void ShowNian(){
        List<User> list = service.listNian();
        for (User user : list) {
            System.out.println(user);
        }
    }

    @Test
    public void ShowYun(){
        List<User> list = service.listYun();
        for (User user : list) {
            System.out.println(user);
        }
    }

    @Test
    public void ShowPai(){
        List<UserPai> list = service.listPai();
        for (UserPai userPai : list) {
            System.out.println(userPai);
        }
    }
}
